package tp.pr5.mv.instructions.logic;

import tp.pr5.mv.Opcode;
import tp.pr5.mv.instructions.BinaryInstructions;
import tp.pr5.mv.traps.MVTrap;

public class EQ extends BinaryInstructions{
	
	public EQ() {
		
		op = Opcode.EQ;
	}
	
	public int combine ( int op1, int op2 ) throws MVTrap {
		
		if ( op2 == op1 )    // Si op2 (subcima) es igual que op1 (cima), el resultado será 1.
			return 1;
		else 
			return 0;
	}

}
